import Vue from 'vue';

function importAll(r) {
  let components = {};
  r.keys().forEach(key => {
    const name = key.match(/\/(\w+?)\.vue$/)[1];
    components[name] = r(key).default;
  });
  return components;
}

//导出所有模块
export default importAll(require.context('./', true, /\.vue$/));
